import { Request, RequestForExportFile } from '@/plugins/supplier-request'
import { SUPPLIER_CLUES_PATH, EXPORT_PATH } from './../constans'

// 供应商管理 - 线索供应商 - 列表查询
export const queryCluesSupplierListService = (data) => {
  return Request(`${SUPPLIER_CLUES_PATH}/query-all`, 'post', data)
}
// 供应商管理 - 线索供应商 - 导出文件
export const exportCluesSupplierFileService = (data) => {
  return RequestForExportFile(`${EXPORT_PATH}/export-clues-query`, 'get', data)
}

// 供应商管理 - 线索供应商 - 线索供应商转合格
export const cluesConversionQualifiedSupplier = (data) => {
  return Request(`${SUPPLIER_CLUES_PATH}/clues-conversion-qualified-supplier`, 'post', data)
}

// 供应商管理 - 线索供应商 - 新建线索供应商
export const createCluesSupplier = (data) => {
  return Request(`${SUPPLIER_CLUES_PATH}/create-clues-supplier`, 'post', data)
}

// 供应商管理 - 线索供应商 - 编辑线索供应商
export const updateCluesSupplier = (data) => {
  return Request(`${SUPPLIER_CLUES_PATH}/update-clues-supplier`, 'post', data)
}

// 供应商管理 - 线索供应商 - 根据供应商id查询线索供应商
export const getCluesSupplier = (data) => {
  return Request(`${SUPPLIER_CLUES_PATH}/get-clues-supplier?supplierId=${data.supplierId}`, 'post', data)
}
